import request from "../utils/request";
import qs from "qs";
export const findRobots = () => {
    return request({
        method: 'GET',
        url:`/chat/robot`
    })
}


export const chatInfoList = (data) => {
    return request({
        method: 'POST',
        url:'/chat/robot/chatInfoList',
        data
    })
}


export const uploadBackground = (data) => {
    return request({
        method: 'POST',
        url:'/chat/robot/uploadImage',
        // headers: { 'content-type': 'application/form-data' },
        // data: qs.stringify(data)
        data
    })
}


export const updateRobot = (data) => {
    return request({
        method: 'POST',
        url:'/chat/robot/updateRobot',
        data
    })
}

export const findByRobotId = (robotId) => {
    return request({
        method: 'GET',
        url:'/chat/robot/findByRobotId?robotId='+robotId
    })
}


export const create = (data) => {
    return request({
        method: 'POST',
        url:'/chat/robot/create',
        data
    })
}

